<template>
    <button @click="btn">click</button>
</template>

<script setup lang="js" name="test">
import { reactive } from 'vue';

let people = reactive({
    id: '001',
    name: 'zhangsan',
    age: 18
})
console.log(people);
function btn() {
    let change = {
        id: '002',
        name: 'lisi',
        age: 20
    }
    Object.assign(people, change)
    console.log(people);
}

</script>

<style></style>